import Link from 'next/link';
import { CloseCircleOutlined } from "@ant-design/icons";
import styles from '../Taohuajie.module.scss';
import Banner from "@/public/activity/banner-fixed.png";

export default function FixedBanner (){

    // close
    function close() {
        const currentElem = document.querySelector('.thj-fixed-banner');
        currentElem.remove()
    }

    return (
        <div className={['thj-fixed-banner', styles['taohuajie-fixed']].join(' ')}>
            <div className="max-content">
                <Link href="/activity/taohuajie" prefetch={false}>
                    <a target="_blank">
                        <img src={process.env.basePath + Banner.src} alt="" />
                    </a>
                </Link>
                <div className={styles['close']} title="关闭，不再显示">
                    <CloseCircleOutlined onClick={() => close()} />
                </div>
            </div>
        </div>
    )

}